package com.teaching.teachingsupport.controller.studentcontroller;

import java.util.List;

import com.teaching.teachingsupport.common.pojo.dataobject.Homework;
import com.teaching.teachingsupport.common.utils.SecurityUtils;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.teaching.teachingsupport.service.service2.studentservice.HomeworkService;
import lombok.RequiredArgsConstructor;

@RestController
@RequestMapping("/api/student/homework")
@RequiredArgsConstructor
public class HomeworkManagementController {

    private final HomeworkService homeworkServiceImpl;
    private final SecurityUtils securityUtils;

    @GetMapping("/getHomework")
    public List<Homework> getHomework() {
        return homeworkServiceImpl.getHomework(securityUtils.getCurrentUserId());
    }
}